package com.ruoyi.framework.context;

public class BaseContext {
    /**
     * 创建本地线程 记录当前登录用户id
     */
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }//设置要传入的值

    public static Long getCurrentId() {
        return threadLocal.get();
    }//获取传入的值

    public static void removeCurrentId() {
        threadLocal.remove();
    }//移除值

}
